<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/7/2
  Time: 4:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="resourse/css/layui.css">
    <script src="resourse/layui.js"></script>
    <%--<link rel="stylesheet" href="//res.layui.com/layui/dist/css/layui.css"  media="all">--%>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

<blockquote class="layui-elem-quote">
    大部分演示都在layer独立组件的官网，与内置的layer模块，用法是完全一致的
</blockquote>
<a class="layui-btn layui-btn-normal" href="http://layer.layui.com/" target="_blank">前去layer官网</a>

<fieldset class="layui-elem-field layui-field-title site-demo-button" style="margin-top: 30px;">
    <legend>特殊例子</legend>
</fieldset>


<button data-method="setTop" class="layui-btn">多窗口模式，层叠置顶</button>



<script>
    layui.use('layer',function(){

        var layer=layui.layer;

        layer.open({
            type:2,
            title:'天天',
            content:'index.jsp,{icon: 5}',
//            offset: '100px',
            skin:'layui-layer-molv',
//            area: ['500px', '300px'],
            offset: '100px',
            btn:['关闭','开启'],
            yes:function (index, layero) {
                layer.close(index);
            },
            btn2: function(index, layero){
                //按钮【按钮二】的回调
                alert("你渴望力量吗");
                layer.close(index);
            },
//            btnAlign: 'l',
//            closeBtn: 2,
//            shade: [0.8, '#393D49'],
//            shadeClose:true,
            tips: 3,
            anim: 3,
            isOutAnim: true,
            time:5000,
            maxmin: true,
            success: function(layero, index){
                console.log(layero, index);
            },
            cancel: function(index, layero){
                if(confirm('确定要关闭么')){
                    layer.close(index)
                }
                return false;
            }



        });

        layer.confirm('is not?', {icon: 3, title:'提示'}, function(index){

            layer.close(index);
        });
        var index = layer.load(1, {time: 10*1000});


    });
</script>

</body>
</html>
